<!DOCTYPE html>
<html ng-app="app">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>分类搜索</title>
<link href="css/base.css" type="text/css" rel="stylesheet" />
<style type="text/css">
/* search */
.search select{display:none; }
.search .select_box{font-size:12px;color:#999999;width:100px;line-height:35px;float:left;position:relative;}
.search .select_showbox{height:35px;background:url(img/search_ico.png) no-repeat 80px center;text-indent:1.5em;}
.search .select_showbox.active{background:url(img/search_ico_hover.png) no-repeat 80px center;}
.search .select_option{border:2px solid #0068b7;border-top:none;display:none;left:-2px;top:35px;position:absolute;z-index:99;background:#fff;}
.search .select_option li{text-indent:1.5em;width:90px;cursor:pointer;}
.search .select_option li.selected{background-color:#F3F3F3;color:#999;}
.search .select_option li.hover{background:#BEBEBE;color:#fff;}
.search{color:#0068b7;border:2px solid ;height:35px;margin:40px auto 0 auto;width:525px;}
.search select{float:left; font-size:12px;height: 35px;width:100px;}
.search select option.hover{background-color: red;}
.search input.inp_srh,.search input.btn_srh{border:none;background:none;height:35px;line-height:35px;float:left}
.search input.inp_srh{outline:none;width:365px;}
.search input.btn_srh{background:#0068b7;color:#FFF;font-family:"微软雅黑";font-size:15px;width:60px;}

</style>
</head>
<body>
<div class="search radius6" ng-controller="searchdata">
	<form name="searchform" ng-submit="search()">
		<input name='ecmsfrom' type='hidden' value='9'>
		<input type="hidden" name="show" value="title,newstext">
		<select name="classid" id="choose" class="SelectList" >
			<option value="0">搜索全部</option>
			<option value="1">按坐席</option>
			<option value="2">按队列</option>
			<option value="3">按时间</option>
		</select> 
		<input class="inp_srh" id="input_srh"name="keyboard" ng-model="sear">
		<input class="btn_srh" type="submit" name="submit" value="搜索">
	</form> 
</div>
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/jquery.select.js"></script>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript">
	var app=angular.module("app",[]);
			app.controller('searchdata',function($scope){
				  document.getElementById('input_srh').style. placeholder='请输入队列号/座席号/时间';
				$scope.search=function(){
					var c=document.getElementById('select_showbox').textContent;
					console.log(c);
					document.getElementById('input_srh').style. placeholder='请输入队列号/座席号/时间';
				/*	 switch(c){
                        case '搜索全部':
                            document.getElementById('input_srh').style. placeholder='请输入队列号/座席号/时间';
                            break;
                        case '按坐席':
                            document.getElementById('input_srh').style.placeholder='请输入座席号';
                            break;
                        case '按队列':
                            document.getElementById('input_srh').style.placeholder='请输入队列号';
                            break;
                        case '按时间':
                            document.getElementById('input_srh').style.placeholer='请输入时间';
                            break;
                    }
                    */
					//var te=document.getElementsByClassName('select_showbox').textContent;
					//console.log(te);
					var str	=searchform.keyboard.value;
			console.log(str);
			var queuenum =['630','630','632','635'];
			var extension=801;
			var offset=10;
			var perPage=10;
			 var t = "select count(AcctId) as rows from cdr where dst like '%"+str+"%' and calleenum like '%"+str+"%'and start like '%" +str+"%' limit " + offset + "," + perPage;
                                                console.log(t);
			var a = "select * from cdr where dst='" + extension + "' and calleenum like '"+str+"'and start like'" +str+"' limit " + offset + "," + perPage;
                                        console.log(a);
				};

			});
</script>
</body>
</html>